#include "Player.h"

int vision = 3;
Player::Player(TileManager* tim)
{
	graphic  =SDL_CreateRGBSurface(SDL_HWSURFACE, 32, 32, 32,
		0x00, 0x00, 0x00, 0x00);
	tm = tim;
	collides=true;
	//tile = tm->getTile(0,0);
	Drawable::x = 0;
	Drawable::y= 0;
	uid =1;
	Drawable::lightEmitted = 3.0;

	Draw::apply_surface(0 , 0 , tm->tileset , graphic ,& tm->images[tm->getIndex(1,7)]);
	
	//vision = 3;
	//man, this is ugly
}


Player::~Player(void)
{
}
 //to draw the shroud, we need a reference to the player's location, and a reference to every tile.
//tilemanager has the reference to every tile. I could pass it xy of player and have it do the shroud.
//but then I essentially have to pass xy of player on every update.

//the player is not the only light source!
//we should keep track of every light source, and draw the shroud based on all of them,
//not just the player.this way a torch in the distance causes you to be able to 
// see squares around it, but not between you and it